package com.kotlin.use.bean

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Ignore
import androidx.room.PrimaryKey

@Entity(tableName = "users")
data class User(
    @PrimaryKey(autoGenerate = true) val id: Int = 0,
    @ColumnInfo(name = "name") val username: String,
    @ColumnInfo(name = "age") val age: Int
) {
    // 可选的辅助构造函数
    @Ignore
    constructor(username: String, age: Int) : this(0, username, age)

    constructor(): this(0, "", 0)
}



